home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_08_09
/
8n09071b
< prev
next >
Wrap
Text File
|
1990-05-30
|
3KB
|
87 lines
Listing 5 - Basic File System Control Structures
/**************************************************************
* application session/file control block structure *
**************************************************************/
typedef struct {
int state; /* state of session */
char sname[16]; /* server name */
char fname[64]; /* filename name */
char ftype[8]; /* access type */
} RFILE;
/**************************************************************
* client fifo control block structure *
**************************************************************/
typedef struct {
int afifo; /* apl fifo */
int pid; /* apl pid */
int link; /* link count */
char afname[64]; /* apl fifo name */
} C_FCB;
/**************************************************************
* client session control block structure *
**************************************************************/
typedef struct {
int pid; /* apl pid */
int fid; /* apl file id */
int lid; /* line cntl blk id */
int state; /* cntl blk state */
int ssid; /* server session id */
} C_SCB;
/**************************************************************
* client line control block structure *
**************************************************************/
typedef struct {
int port; /* x.25 port id */
int cid; /* x.25 circuit id */
int link; /* session link count */
char sname[16]; /* server name */
char raddr[16]; /* server X.25 addr */
char *cbuf; /* x.25 cmd buf ptr */
char *rbuf; /* x.25 rsp buf ptr */
char *dbuf; /* x.25 data buf ptr */
} C_LCB;
/**************************************************************
* server line control block structure *
**************************************************************/
typedef struct {
int port; /* x.25 port id */
int cid; /* x.25 circuit id */
int link; /* session link count */
char cname[16]; /* client name */
char raddr[16]; /* client X.25 addr */
char *cbuf; /* x.25 cmd buf ptr */
char *rbuf; /* x.25 rsp buf ptr */
char *dbuf; /* x.25 data buf ptr */
} S_LCB;
/**************************************************************
* server session control block structure *
**************************************************************/
typedef struct {
int lid; /* line cntl blk id */
FILE *fid; /* file cntl blk id */
char fname[64]; /* file name */
char ftype[8]; /* access type */
int state; /* cntl blk state */
int csid; /* client session id */
} S_SCB;